package com.zzyl.controller.app;

import cn.hutool.http.HttpUtil;
import com.zzyl.base.ResponseResult;
import com.zzyl.controller.BaseController;
import com.zzyl.dto.CustomerUserLoginDto;
import com.zzyl.service.MemberService;
import com.zzyl.vo.LoginVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class AppMemberController extends BaseController {

    @Autowired
    private MemberService memberService;

    @PostMapping("/customer/user/login")
    public ResponseResult login(@RequestBody CustomerUserLoginDto customerUserLoginDto){
        LoginVo loginVo = memberService.login(customerUserLoginDto);
        return success(loginVo);
    }

}
